Currently, a battery of an electronic device is charged by a power adapter of the electronic device. Usually, the power adapter charges the battery with a constant-voltage output mode. However, for the battery with large capacity, too long charging time may be caused because of the constant-voltage output mode. Therefore, quick-charging for the battery cannot be realized and the charging time cannot be shortened by adjusting an output current and an output voltage of the power adapter in the above related art.